import request from '@/utils/request'

//商品
export function fetchList(params) {
  return request({
    url: '/api/goodsAlldetails',
    method: 'get',
    params
  })
}


export function selectgoods(params) {
  return request({
    url: '/api/select_goods',
    method: 'post',
    params
  })
}


export function select_goodsstock(params) {
  return request({
    url: '/api/select_goodsstock',
    method: 'post',
    params
  })
}

export function updategoods(params) {
  return request({
    url: '/api/update_goods',
    method: 'post',
    params
  })
}

export function creategoods(params) {
  return request({
    url: '/api/insert_goods',
    method: 'post',
    params
  })
}

export function delete_goods(params) {
  return request({
    url: '/api/delete_goods',
    method: 'post',
    params
  })
}

export function update_state(params) {
  return request({
    url: '/api/update_state',
    method: 'post',
    params
  })
}

//颜色表管理
export function selectallcolor(params) {
  return request({
    url: '/api/getAllcolor',
    method: 'get',
    params
  })
}

export function selectcolorbyid(params) {
  return request({
    url: '/api/get_bycolorid',
    method: 'get',
    params
  })
}

export function updatecolor(params) {
  return request({
    url: '/api/update_color',
    method: 'post',
    params
  })
}

export function deletecolor(params) {
  return request({
    url: '/api/delete_color',
    method: 'post',
    params
  })
}

export function createcolor(params) {
  return request({
    url: '/api/insert_color',
    method: 'post',
    params
  })
}

//尺码表管理
export function selectallsize(params) {
  return request({
    url: '/api/getAllsize',
    method: 'get',
    params
  })
}

export function selectsizebyid(params) {
  return request({
    url: '/api/get_bysizeid',
    method: 'get',
    params
  })
}

export function updatesize(params) {
  return request({
    url: '/api/update_size',
    method: 'post',
    params
  })
}

export function deletesize(params) {
  return request({
    url: '/api/delete_size',
    method: 'post',
    params
  })
}

export function createsize(params) {
  return request({
    url: '/api/insert_size',
    method: 'post',
    params
  })
}

//库存
export function selectallstock(params) {
  return request({
    url: '/api/getAllstock',
    method: 'get',
    params
  })
}

export function selectstockbyid(params) {
  return request({
    url: '/api/get_bystockgoodsid',
    method: 'get',
    params
  })
}

export function selectstockid(params) {
  return request({
    url: '/api/get_stockgoodsid',
    method: 'get',
    params
  })
}

export function insert_stock(params) {
  return request({
    url: '/api/insert_stock',
    method: 'post',
    params
  })
}

export function delete_stock(params) {
  return request({
    url: '/api/delete_stock',
    method: 'post',
    params
  })
}



//入库
export function selectallstorage(params) {
  return request({
    url: '/api/getAllput',
    method: 'get',
    params
  })
}

export function selectpubbyid(params) {
  return request({
    url: '/api/getputbyid',
    method: 'get',
    params
  })
}

export function selectpubrecordbyid(params) {
  return request({
    url: '/api/getput_recordbyid',
    method: 'get',
    params
  })
}

export function insert_putstorage(params) {
  return request({
    url: '/api/insert_putstorage',
    method: 'post',
    params
  })
}

//出库

export function selectalloutbound(params) {
  return request({
    url: '/api/getAlloutbound',
    method: 'get',
    params
  })
}

export function selectoutbyid(params) {
  return request({
    url: '/api/getoutboundbyid',
    method: 'get',
    params
  })
}

export function selectoutrecordbyid(params) {
  return request({
    url: '/api/get_outboundbyid',
    method: 'get',
    params
  })
}


export function insert_outbound(params) {
  return request({
    url: '/api/insert_outbound',
    method: 'post',
    params
  })
}